package com.ruoyi.system.annotation;

import com.ruoyi.system.domain.vo.UserData;

public class UserContext {
    private static final ThreadLocal<UserData> userContext = new ThreadLocal<>();

    public static void setUserData(UserData userData) {
        userContext.set(userData);
    }

    public static UserData getUserData() {
        return userContext.get();
    }

    public static void clear() {
        userContext.remove();
    }
}